//
//  MineListTableViewCell.m
//  fxxiaoke
//
//  Created by 鞠超 on 16/9/5.
//  Copyright © 2016年 jc. All rights reserved.
//

#import "MineListTableViewCell.h"

@implementation MineListTableViewCell

- (instancetype )initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if(self)
    {
        [self p_setupView];
    }
    
    return self;
}

- (void )p_setupView
{
    self.image_list = [[UIImageView alloc] init];
//    self.image_list.backgroundColor = [UIColor orangeColor];
    [self.contentView addSubview:self.image_list];
    
    self.name_list = [[UILabel alloc] init];
    self.name_list.font = [UIFont systemFontOfSize:16];
    self.name_list.textColor = [UIColor blackColor];
    [self.contentView addSubview:self.name_list];
    
    self.icon_return = [[UIImageView alloc] init];
    self.icon_return.image = [UIImage imageNamed:@"rigth-return.png"];
    self.icon_return.layer.masksToBounds = YES;
    [self.contentView addSubview:self.icon_return];
    
    self.list_line = [[UIView alloc] init];
    self.list_line.backgroundColor = [UIColor groupTableViewBackgroundColor];
    [self.contentView addSubview:self.list_line];
}

- (void )layoutSubviews
{
    [super layoutSubviews];
    
    self.image_list.frame = CGRectMake(10, 15, 30, 30);
    
    self.name_list.frame = CGRectMake(CGRectGetMaxX(self.image_list.frame) + 10, 22.5, 200, 15);
    
    self.icon_return.frame = CGRectMake(SCREEN_WIDTH - 5 - 20, 20, 20, 20);
    
    self.list_line.frame = CGRectMake(CGRectGetMinX(self.name_list.frame), 59, SCREEN_WIDTH - CGRectGetMinX(self.name_list.frame), 1);
}
















@end
